home *** CD-ROM | disk | FTP | other *** search
-
- % -----------------------------------------------------------------------------
- % BLINK.TSL *TERMINATE PRESCRIPTION*
- % -----------------------------------------------------------------------------
- %
- % Version : 1.00
- % Filename : BLINK.TSL
- % Company : BLOKKER+BLOKKER Software
- % Programmer : Joop Blokker
- % Module created : 13-Aug-1995
- % Latest revision :
- % Language/version : Terminate Prescription 1.00
- % Remarks : Use 16 foreground and 16 background colors.
- % : Include file COLOR110.INC version 1.10 needed.
- %
- % -----------------------------------------------------------------------------
- %
- % To obtain 16 foreground and 16 background colors, the blink bit
- % has to be disabeled. This you can do with the ToggleBlinkBit
- % function that is stored in COLOR110.INC
- %
- % In this demo you can see that for the background colors also
- % the values 8 to 15 can be used. If the Blink Bit is ON (1) then you
- % will see blinking text; if it is OFF (0) then the background color
- % is equal to the foreground color.
- %
- % Before the demo starts the current status of the Blink Bit is
- % retrieved with the Function BlinkBit(), so after de demo the
- % original status can be restored.
- %
- % Note: The Function ToggleBlinkBit(Status) contains an INTERRUPT call.
- % Do NOT change anything in that Function, unless you absolutely KNOW
- % what you are doing.
- %
- % ------------------------------------------------------------------------
-
- Include color.inc
-
- % Save current screen color of column 1, row 1
- % --------------------------------------------
- ClearScreen
- Set SaveColor = GetAttrXY(1, 1)
-
- % Save current blink bit status
- % -----------------------------
- Set SaveBlinkBitStatus = BlinkBit(0)
-
- SetAttr LightGray + (Red * 16)
- ClearScreen
-
- % Choose color with background > 7
- % --------------------------------
- Set BoxColor = White + (LightBlue * 16)
- Box 30, 10, 50, 12, BoxColor, 3
-
- GotoXY 1,1
- Set TColor = Black + (White*16)
- WriteAStr 15,18,TColor," Press any key to toggle blinkstatus. Esc to stop "
-
- % Now Toggle Blink Bit OFF and ON
- % -------------------------------
- Set Status = BlinkBit(0)
- repeat
- Set Dummy = ToggleBlinkBit(Status)
- If Status = 0
- WriteAStr, 32,11,BoxColor, " HIGH INTENSITY "
- Set Status = 1
- Else
- WriteAStr, 32,11,BoxColor, " BLINKING "
- Set Status = 0
- Endif
- Set Key = GetKey
- until Key=27
-
- % Now restore the original attribute and blinkbit status
- % ------------------------------------------------------
- SetAttr SaveColor
- Set Dummy = ToggleBlinkBit (SaveBlinkBitStatus)
-
- ClearScreen
- TERMINATE
-
-